Skip to content

Add external OpenSearch support with E2E test#268

Closed
rtuszik wants to merge 5 commits intomainfrom
claude/external-opensearch-photon-elVy2
Closed

Add external OpenSearch support with E2E test#268
rtuszik wants to merge 5 commits intomainfrom
claude/external-opensearch-photon-elVy2

Conversation

@rtuszik
Copy link
Copy Markdown
Owner

@rtuszik rtuszik commented Mar 1, 2026

Allow photon-docker to connect to a self-hosted OpenSearch instance instead of relying on photon's embedded one. When OPENSEARCH_TRANSPORT_ADDRESSES is set, the container skips index downloads, passes -transport-addresses and -cluster to photon.jar, and forces UPDATE_STRATEGY=DISABLED.

  • config.py: add OPENSEARCH_TRANSPORT_ADDRESSES and OPENSEARCH_CLUSTER env vars
  • entrypoint.py: skip download logic when external OpenSearch is configured
  • process_manager.py: conditional command construction (external vs embedded), skip initial setup and lock file cleanup for external mode
  • validate_config.py: warn when REGION is set alongside external OpenSearch
  • docker-compose.external-opensearch.yml: user-facing compose for external setup
  • external-opensearch-test.yml: E2E GitHub Actions workflow that downloads andorra index, pre-loads it into standalone OpenSearch 3.x via dangling index import, and verifies photon health check passes

claude added 4 commits March 1, 2026 13:36
Allow photon-docker to connect to a self-hosted OpenSearch instance
instead of relying on photon's embedded one. When OPENSEARCH_TRANSPORT_ADDRESSES
is set, the container skips index downloads, passes -transport-addresses and
-cluster to photon.jar, and forces UPDATE_STRATEGY=DISABLED.

- config.py: add OPENSEARCH_TRANSPORT_ADDRESSES and OPENSEARCH_CLUSTER env vars
- entrypoint.py: skip download logic when external OpenSearch is configured
- process_manager.py: conditional command construction (external vs embedded),
  skip initial setup and lock file cleanup for external mode
- validate_config.py: warn when REGION is set alongside external OpenSearch
- docker-compose.external-opensearch.yml: user-facing compose for external setup
- external-opensearch-test.yml: E2E GitHub Actions workflow that downloads
  andorra index, pre-loads it into standalone OpenSearch 3.x via dangling
  index import, and verifies photon health check passes

https://claude.ai/code/session_01LJJEVsnKGopysw7LtMHBQi
The download server organizes sub-regions under their continent:
/europe/andorra/photon-db-andorra-1.0-latest.tar.bz2

https://claude.ai/code/session_01LJJEVsnKGopysw7LtMHBQi
…ta mounting

The previous approach downloaded a pre-built index tar.bz2 and tried to mount
it into OpenSearch 3.0.0 via dangling index auto-import. This failed because:
- OpenSearch 3.0.0 dropped the `es.` system property prefix (replaced by
  `opensearch.`), so `-Des.gateway.auto_import_dangling_indices=true` was
  silently ignored
- The embedded OpenSearch data format from photon is not directly compatible
  with standalone OpenSearch 3.0.0

Replace the broken data-mounting strategy with photon.jar's own import command
using a minimal JSONL dump file. This creates the index with the correct
mapping and is version-independent.

Also fix the docker-compose comments to use the correct `-import-file`
parameter (was incorrectly documented as `-json-dump`).

https://claude.ai/code/session_01LJJEVsnKGopysw7LtMHBQi
OpenSearch 3.0.0 dropped the `es.` system property prefix. The dangling
index auto-import setting was silently ignored because `-Des.gateway...`
is not recognized — it must be `-Dopensearch.gateway...`.

https://claude.ai/code/session_01LJJEVsnKGopysw7LtMHBQi
@rtuszik
Copy link
Copy Markdown
Owner Author

rtuszik commented Mar 1, 2026

lmao

OpenSearch 3.0.0 ignores cluster settings passed via -D JVM system
properties. Move gateway.auto_import_dangling_indices to opensearch.yml
where it is actually read. Also set cluster.name to "photon" so it
matches the OPENSEARCH_CLUSTER value photon uses to connect.

https://claude.ai/code/session_01LJJEVsnKGopysw7LtMHBQi
@rtuszik rtuszik closed this Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants